<div class="container">
    <div class="row">
        <div class="col-sm-3">
            <div class="org-tree" style="margin-top: 40px">
                <div class="load load-md" ng-if="!vm.isTreeLoad">
                    <i class="fa fa-spin fa-spinner"></i><span class="load-text">数据加载中...</span>
                </div>
                <div ng-if="vm.isTreeLoad" ui-tree data-drag-enabled="false">
                    <ol ui-tree-nodes ng-model="vm.treeNode" class="tree-parent">
                        <li class="tree-root" ng-repeat="node in vm.treeNode track by $index" ui-tree-node
                            data-collapsed="false" ng-include="'nodes_renderer_ajax.html'">
                        </li>
                    </ol>
                </div>
            </div>
        </div>
        <div class="col-sm-9">
            <div ng-if="vm.isTreeLoad">
                <div class="page-header">
                    <a href="/ctg-sysmgr-permission-demo/logout" class="pull-right"><i class="fa fa-sign-out"></i>退出</a>
                    <h1>权限管理案例</h1>
                </div>
                <ui-view></ui-view>
            </div>
        </div>
    </div>
</div>
<script type="text/ng-template" id="nodes_renderer_ajax.html">
    <div ui-tree-handle class="tree-node tree-node-content">
        <span data-nodrag class="tree-ico" ng-class="{'tree-folder-o': collapsed, 'tree-folder-open-o': !collapsed, 'tree-file-o': !node.hasChildren }"></span>
        <a data-nodrag class="tree-node-handle" ui-sref="grant{{(node.url_addr ? '.' + node.url_addr : '')}}" ng-click="vm.selectNode(this, node, $event)">
            <span class="tree-node-name">{{node.menu_name}}</span>
        </a>
        <span ng-show="node.loading"><i class="fa fa-spin fa-spinner"></i></span>
    </div>
    <ol class="tree-line" ui-tree-nodes ng-model="node.item" ng-if="node.item && node.item.length" ng-class="{'hidden': collapsed}">
        <li collapsed="true" ng-repeat="node in node.item track by $index" ng-class="{'has-child': node.hasChildren}" ui-tree-node ng-include="'nodes_renderer_ajax.html'">
        </li>
    </ol>
</script>